package com.lottery.dao.pc28.statisticsDao;

import com.lottery.entity.AgencyMoney;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * AgencyMoney代理金额统计表接口
 */

public interface AgencyMoneyDao {

	/**
	 * 插入一条数据
	 */
	void insertAgencyMoney(AgencyMoney agencymoney);

	/**
	 * 统计分组查询
	 * 
	 * @return
	 */
	List<AgencyMoney> getAgencyMoneyLimit(@Param(value = "expect") String expect);

	/**
	 * 
	 * 获取亏损的金额
	 * 
	 * @param expect
	 * @return
	 */
	double getBettingmoney(AgencyMoney agencyMoney);

	/**
	 * 获取中奖的金额
	 * 
	 * @param agencyMoney
	 * @return
	 */
	double getWinningamount(AgencyMoney agencyMoney);

	/**
	 * 获取最近5期的期号
	 * 
	 * @return
	 */
	List<AgencyMoney> selectAgencyMoneyExpect();

	/**
	 * 根据期号和代理方id得到对象
	 * 
	 * @return
	 */
	AgencyMoney getAgencyMoney(AgencyMoney agencyMoney);

}
